﻿using GameStoreMinimalApi.WebApi.Entities;
using Microsoft.EntityFrameworkCore;
using System.Reflection;

namespace GameStoreMinimalApi.WebApi.Data;

public class GameStoreDbContext : DbContext
{
    public GameStoreDbContext(DbContextOptions<GameStoreDbContext> options) : base(options)
    {
    }

    public DbSet<Game> Games => Set<Game>();

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
    }
}
